package com.atguigu.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Name: MyComputer
 * @ClassName Address
 * @Description:
 * @date 2023/5/18 19:56
 */
@Data
public class Address implements Serializable {

    public static final Long serialVersion = 1L;

    @TableId(type = IdType.AUTO)
    private Integer id;

    @NotBlank
    private String linkman;

    @NotBlank
    private String phone;

    @NotBlank
    private String address;

    @NotNull
    @TableField("user_id") //当名称不一样时使用 ， 用来映射表名与字段名
    private Integer userId;

}
